package cc.itez.wx.linkman.val;

import cn.hutool.core.util.StrUtil;

import java.util.Objects;

public enum Role {
    /**
     * 超级管理员
     */
    SUPER_ADMIN("SUPER_ADMIN"),
    /**
     * 普通管理员
     */
    ADMIN("ADMIN");

    private final String uuid;

    Role(String uuid) {
        this.uuid = uuid;
    }

    public static Role of(String uuid) {
        if (StrUtil.isNotEmpty(uuid)) {
            for (Role value : values()) {
                if (Objects.equals(uuid, value.uuid)) {
                    return value;
                }
            }
        }
        return null;
    }
}
